    <!--页面主要内容-->
    <main class="lyear-layout-content">    
      <div class="container-fluid">        
        <div class="row">
          <div class="col-lg-12">
            <div class="card">
              <div class="card-body">            
                <form action="{:url('addad')}" method="post" class="row" enctype="multipart/form-data">
                    
                    <div class="toolbar-btn-action">
                        <div class="btn btn-primary m-r-5">为刚添加的商品“{$pname}”添加等级属性</div>
                        <input type="text" name="pid" value="{$pid}" style="display:none;" />
                        <input type="text" name="pname" value="{$pname}" style="display:none;" />
                    </div>
                    <div class="toolbar-btn-action" style="margin-top:20px;">
                      <div class="btn btn-primary m-r-5" id="adddj"><i class="mdi mdi-plus"></i> 增加属性等级</div><br/>
                      <label for="title">属性名称及其价格</label><label for="title" style="color: #fa4646;font-size: 8px;">&nbsp;&nbsp;(不能为空)</label><br/>
                    </div>
                  <div class="form-group col-md-12" style="margin-top:20px" id="addbox">
                    <input type="text" style="width:20%;display:inline-block;" class="form-control" id="title" name="psname[]" value="" placeholder="请输入属性名称" />——
                    <input type="text" style="width:20%;display:inline-block;" class="form-control" id="title" name="allnum[]" value="" placeholder="请输入总量" />——
                    <input type="text" style="width:20%;display:inline-block;" class="form-control" id="title" name="psprice[]" value="" placeholder="请输入价格" /><br/><br/>
                  </div>
                 
                  <div class="form-group col-md-12">
                    <button type="submit" class="btn btn-primary ajax-post" target-form="add-form">确 定</button>
                    <button type="button" class="btn btn-default" onclick="javascript:history.back(-1);return false;">返 回</button>
                  </div>
                </form>
       
              </div>
            </div>
          </div>
          
        </div>
        
      </div>
      
    </main>
    <!--End 页面主要内容-->
  </div>
</div>

<script type="text/javascript" src="__PUBLIC__/js/jquery.min.js"></script>
<!--增加元素-->
<script>
     $(function(){  
        //append(),在父级最后追加一个子元素  
        $("#adddj").click(function(){
            $("#addbox").append("<input type='text' style='width:20%;display:inline-block;' class='form-control' name='psname[]' value='' placeholder='请输入属性名称' />——<input type='text' style='width:20%;display:inline-block;' class='form-control' id='title' name='allnum[]' value='' placeholder='请输入总量' />——<input type='text' style='width:20%;display:inline-block;' class='form-control' name='psprice[]' value='' placeholder='请输价格' /><br/><br/>");
        });
     })
</script>
<script type="text/javascript" src="__PUBLIC__/js/bootstrap.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/js/perfect-scrollbar.min.js"></script>
<!--标签插件-->
<script src="__PUBLIC__/js/jquery-tags-input/jquery.tagsinput.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/js/main.min.js"></script>
<!--时间选择插件-->
<script src="__PUBLIC__/js/bootstrap-datetimepicker/moment.min.js"></script>
<script src="__PUBLIC__/js/bootstrap-datetimepicker/bootstrap-datetimepicker.min.js"></script>
<script src="__PUBLIC__/js/bootstrap-datetimepicker/locale/zh-cn.js"></script>
</body>
</html>